package com.campus.app.mapper;

import com.campus.commons.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.commons.utils.Result;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 老师表 Mapper 接口
 * </p>
 *
 * @author Rin
 * @since 2020-12-24
 */
@Repository
public interface TeacherMapper extends BaseMapper<Teacher> {

    /**
     * 通过xml 获取老师的信息
     * @param page
     * @param limit
     * @return
     */
    List<Teacher> getTeacherAll_xml(int page, int limit);

    /**
     * 复合查询通过xml
     * @param page
     * @param limit
     * @param teacherName
     * @param phone
     * @param roleName
     * @param idCard
     * @return
     */
    List<Teacher> getTeacherBy_xml(int page, int limit, String teacherName, String phone, String roleName, String idCard);

    /**
     * 复合查询
     *
     * @param teacherName
     * @param phone
     * @param roleName
     * @param idCard
     * @return
     */
    int getTeacherBy_xmlCount(String teacherName, String phone, String roleName, String idCard);

    /**
     *查詢一条记录
     * @author 一行琉璃
     * @param id
     * @return
     */
Teacher getOneTeachers(int id);

}
